﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/admin.Master" AutoEventWireup="true"
    Inherits="Wjtour.Web.Admin.line.list" %>

<%@ Import Namespace="Wjtour.Domain" %>
<%@ Import Namespace="Wjtour.Common" %>
<%@ Import Namespace="Wjtour.Domain.dto" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
    <script type="text/javascript">
        function getIds() {
            if ($('#cidselect').val() == 0) {
                alert('没有选择栏目');
                return false;
            }
            var ids = '';
            $('input[name=ids]').each(function () {
                if ($(this).attr('checked') == true) {
                    ids = ids + $(this).attr('id') + ',';
                }
            });
            if (ids == '') {
                alert('没有选择线路');
                return false;
            }
            $('#ids').val(ids);
        }
    </script>
    <table cellspacing="0" width="100%" style="border: 1px  solid #DCEAF7; border-bottom: 0px;
        background: #E9F2FB;">
        <tr>
            <td width="150px">
                &nbsp;<img src="../images/arrow.gif" width="16" height="22" align="absmiddle" />&nbsp;<a
                    href="/admin/line/addedi.aspx" class="link3">[新增线路]</a>
            </td>
            <td width="" align="right">
                标题：<asp:TextBox ID="q" runat="server" />&nbsp;<asp:Button ID="submit" runat="server" Text="提交" />
            </td>
            <td width="150px" align="right">
                共有 <b>
                    <%=data.Pager.TotalRecords%></b> 条记录&nbsp;&nbsp;
            </td>
        </tr>
    </table>
    <table id="listtable" border="1" cellpadding="0" cellspacing="0" bordercolor="#dddddd">
        <tr>
            <th width="3%">
                <input type="checkbox" onclick="checkAll(this,'ids')" />
            </th>
            <th width="">
                线路名称
            </th>
            <th width="6%">
                缩略图
            </th>
            <th width="115px">
                门市价
            </th>
            <th width="8%">
                操作
            </th>
        </tr>
        <%foreach (Wjtour.Domain.line item in data.Datas)
          {
        %>
        <tr>
            <td>
                <input type='checkbox' name='ids' value='<%=item.id %>' id='<%=item.id %>' />
            </td>
            <td style="text-align: left; padding-left: 5px">
                <a href="/admin/line/addedi.aspx?id=<%=item.id %>">
                    <%=item.title %>
            </td>
            <td>
                <img src="<%=item.img %>" onmouseover="openpic('<%=item.img %>','<%=item.title %>',400,400)" style="width: 50px; height: 50px" />
            </td>
            <td>
                <%=item.price %>
            </td>
            <td>
                <a href="/admin/line/addedi.aspx?id=<%=item.id %>">修改</a>
            </td>
        </tr>
        <%
            } %>
    </table>
    <div style="position: relative; padding-bottom: 10px">
        <input type="hidden" id="delRef" value="<%=delIds.ClientID %>" />
        <asp:HiddenField ID="delIds" runat="server" />
        <div style="position: absolute; left: 5px; top: 5px">
            <asp:Button ID="delButton" runat="server" Text="删除" OnClientClick="return delConfirm()" />
        </div>
        <div class="megas512" style="margin-top: 15px;">
        <%=PagerHtml%>
        </div>
    </div>
</asp:Content>
